import 'package:flutter/material.dart';
import 'package:flutter_demo/chapter8-EventNotification/event-mechanism/PointerDownListener.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Event Widget Demo"),
      ),
      body: PointerDownListenerWidget(),
    ),
  ));
}

class PointerDownListenerWidget extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return PointerDownListener(
      child: const Text('Click me'),
      onPointerDown: (e) => print('down'),
    );
  }
}
